<?#//v.3.1.0
//if(!defined('INCLUDED')) exit("Access denied");
#///////////////////////////////////////////////////////
#//  COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//
#///////////////////////////////////////////////////////

#// EDIT THE FOLLOWING LINES *********************************************************
#// Add the languages you want to enable below in the following form:
#//
#//		"XX" => "Language",
#//
#// where 
#//		XX: is the two characters code of the language (i.e. IT for "italian", "FR" for french, ect
#//		Language: is the description of the language
#//
#// Default languages are English and Spanish
$LANGUAGES = array(
"CN" => "Chinese",
"ES" => "Espa&ntilde;ol",
"FR" => "French",
"PG" => "Portuguese",
"DE" => "Deutsch-German",
"IT" => "Italian",
"EN" => "English"
);
#// END OF EDIT AREA *********************************************************


#// Retrieve available languages
/*if($dir = opendir($include_path))
{
	while (($file = readdir($dir)) !== false)
	{
		if(ereg("^messages\.([A-Z]{2})\.inc\.php$",$file,$regs))
		{
			$LANGUAGES[$regs[1]] = $LANGUAGES[$regs[1]];
		}
	}
	closedir($dir);
}     */


if(!function_exists(ShowFlags))
{
	Function ShowFlags()
	{
	GLOBAL $SETTINGS,$LANGUAGES;
   reset($LANGUAGES);

		$counter = 0;
		foreach($LANGUAGES as $lang => $value)
		{
			$counter++;
		}

$counter2 = 0;
		foreach($LANGUAGES as $lang => $value)
		{
					
      if ( $counter > 1 ) {
      print "<A HREF=index_language.php?lan=$lang><IMG vspace=2 hspace=2 SRC=".$SETTINGS['siteurl']."includes/flags/".$lang.".gif BORDER=0 alt=\"$lang\"/></A>";
			          }
      
      $counter2++;
		}
		
		
		
	}
}

if(!function_exists(ShowAdminFlags))
{
	Function ShowAdminFlags()
	{
		GLOBAL $SETTINGS,$LANGUAGES;
		reset($LANGUAGES);
		
		if(count($LANGUAGES) <= 1) return;
		
		$counter = 0;
		foreach($LANGUAGES as $lang => $value)
		{
                        $selected = ($_SESSION['language'] == $lang ? "class=\"select\"" : "");
			print "<a target=\"_top\" $selected HREF=\"index.php?lan=$lang\">$value</a> &nbsp;";
		}
	}
}



?>
